import {request} from "@/api/index";
// 轮播图
function getSwiper() {
    return request( {
        method:'get',
        url:'/frontend/jsMedia/page?jsBusinessType=pc_home_scrolling_pic&pageNum=1&pageSize=10',
    })
}
// 轮播图跳转
function getSwiperRouter(mediaId:any) {
    return request( {
        method:'get',
        url:`/frontend/jsMedia/${mediaId}`,
    })
}
// 人物信息轮播图 冀商风采
function randomList() {
    return request( {
        method:'get',
        url:'/frontend/jsPublicize/randomList',
        data:{
            pageSize:6,
            pageNum:1,
            uuid:1
        }
    })
}
// 人物轮播图跳详情跳转
function getRandomDetail(publicizeId:any) {
    return request( {
        method:'get',
        url:`/frontend/jsPublicize/${publicizeId}`,
    })
}
// 冀商风采 跳转更多
function getMoreDetail() {
    return request( {
        method:'get',
        url:`/jsUser/list`,
    })
}






// //积分明细by日常操作（点赞，转发，观看。。。）
function SetPoints(params: any) {
return request({
method: 'post',
url: `/mini/thumbsUp?name=${11111111111}&likeContent=${'0'}&substanceId=${params.substanceId}`,
params: params
})
}
function danthumpsup(params:any) {
    return request( {
        method:'post',
        url:'/mini/thumbsUp',
        params:params
    })
}


// 积分商城 商品查询   数据
function shopcheck() {
    return request( {
        method:'get',
        url:'/app/shop/list',
        data:{
            goodsName:'',
            goodsClassifyId:1,
        }
    })
}
function shopcheck_0() {
    return request( {
        method:'get',
        url:'/app/shop/list',
        data:{
            goodsName:'',
            goodsClassifyId:0,
        }
    })
}
function exchangeList() {
    return request( {
        method:'get',
        url:'/app/shop/exchangeList',
    })
}

// app的冀商商品秒杀 有问题 报错
function secJi(shopId:any) {
    return request( {
        method:'get',
        url:`/app/shop/secJi`,
        data:shopId

    })
}
//  积分信息
function integral() {
    return request( {
        method:'get',
        url:'/app/user/integral',

    })
}
// 签到过了
function signIn() {
    return request( {
        method:'get',
        url:'/mini/signIn',
    })
}
function minilist() {
    return request( {
        method:'get',
        url:'/mini/list',
    })
}
// app 积分明细   500 POST
function addPoints() {
    return request( {
        method:'post',
        url:'/mini/addPoints',
        data:{
            likeContent:0,
            substanceId:1694672244646023170,
        }
    })
}
//



// 新增积分商城  500  POST
function addShop() {
    return request( {
        method:'post',
        url:'/jsIntegral/shop/addShop',
        data:{
        }
    })
}



//
function shopSort() {
    return request( {
        method:'get',
        url:'/system/dict/data/type/shopping_sort',
        data:{
        }

    })
}
// 查找用户列表
function userList() {
    return request( {
        method:'get',
        url:'/jsIntegral/user/list',
        data:{
        }
    })
}
// 积分商城列表   page1
function shopList() {
    return request( {
        method:'get',
        url:'jsIntegral/shop/list/?pageSize=99&pageNum=1',
        data:{
        }
    })
}
function shopId(shopId:any) {
    return request( {
        method:'get',
        url:`/jsIntegral/shop/list?goodsName=${shopId}&pageNum=100&pageSize=1`,

    })
}
function search(goodsName:any) {
    return request( {
        method:'get',
        url:`/jsIntegral/shop/list?goodsName=${goodsName}&pageNum=1&pageSize=99`,

    })
}








// 首页四个部分 冀商私董会...
function getList() {
    return request({
        method:'get',
        url:'/frontend/jsArticleGroup/page',
    })
}
// 四部分跳转
function getListDetail(GroupId:any) {
    return request({
        method:'get',
        url:`/frontend/jsArticle/page?groupId=${GroupId}&pageNum=0&pageSize=10`,
    })
}
// 文章跳转详情
function articleDetail(jsArticle:any) {
    return request({
        method:'get',
        url:`/frontend/jsArticle/${jsArticle}?jsBusinessType=`,
    })
}

export {getList,getListDetail,randomList,shopcheck,addPoints,addShop,userList,getSwiper,
    shopList,getSwiperRouter,getRandomDetail,getMoreDetail,articleDetail,
    shopSort,signIn,secJi,exchangeList,integral,minilist,shopcheck_0,
    SetPoints,shopId,search,
    danthumpsup
}